﻿using System;
using System.Collections.Generic;
using System.Text;

namespace T.FAS.Runtime.DataAccess.SPI
{

    /// <summary>
    /// 关联关系中的关联项类
    /// </summary>
    [Serializable]
    public class AssociateItem : ICloneable
    {
        #region 常量

        #endregion

        #region 字段

        #endregion

        #region 构造函数
        /// <summary>
        /// 构造函数
        /// </summary>
        public AssociateItem() { }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="sourceElementID">源节点对象元素ID</param>
        /// <param name="targetElementID">目标节点对象元素ID</param>
        /// <param name="sourceElementDisplay">源节点对象元素显示</param>
        /// <param name="targetElementDisplay">目标节点对象元素显示</param>
        public AssociateItem(string sourceElementID, string targetElementID,
                             string sourceElementDisplay = "", string targetElementDisplay = "")
            : this()
        {
            SourceElementID = sourceElementID;
            TargetElementID = targetElementID;
            SourceElementDisplay = sourceElementDisplay;
            TargetElementDisplay = targetElementDisplay;
        }

        #endregion

        #region 属性
        /// <summary>
        /// 来源节点对象元素ID
        /// </summary>       
        public string SourceElementID { get; set; }

        /// <summary>
        /// 来源节点对象元素显示名称
        /// </summary>        
        public string SourceElementDisplay { get; set; }

        /// <summary>
        /// 目的节点对象元素ID
        /// </summary>        
        public string TargetElementID { get; set; }

        /// <summary>
        /// 目的节点对象元素显示名称
        /// </summary>        
        public string TargetElementDisplay { get; set; }

        #endregion

        #region 方法

        /// <summary>
        /// 克隆
        /// </summary>
        /// <returns>关联项的副本</returns>
        public object Clone()
        {
            return this.MemberwiseClone();
        }

        #endregion
    }
}
